@extends('layouts.master')


@section('content')

<div class="ym-grid">
    <div class="ym-gl ym-g33">
        <h2>Đăng Nhập</h2>
        {{ Form::open(array('url' => 'login', 'class' => 'ym-form ym-full')) }}
        <div class="ym-fbox">
            <div class="ym-gbox">
                @if(isset($err))
                <div class="alert-block">
                    <li>{{ $err }}</li>
                </div>
                @endif
                @if($errors->any())
                <div class="alert-block">
                    {{ implode('', $errors->all('
                    <li>:message</li>
                    ')) }}
                </div>
                @endif
                <ul>
                    <li><label for="username">Tài Khoản</label>{{ Form::text('username', null, array('id' =>
                        'username')) }}
                    </li>
                    <li><label for="password">Mật Khẩu</label>{{ Form::password('password', array('id' => 'password'))
                        }}
                    </li>
                    @if(isset($_SESSION['login_times']) && $_SESSION['login_times'] >=3)
                    <li><label for="password">Mã xác thực</label>{{ HTML::image(Captcha::img(), 'Captcha image', array('class' => 'lcaptcha')) }}</li>
                    <li>{{ Form::text('captcha', null, array('id' => 'lcaptcha')) }}</li>
                    @endif
                    <li>{{ Form::checkbox('remember-checkbox', null, false, array('class' => 'remember-checkbox')) }}Ghi
                        nhớ
                        <a href="#" class="forget-password">Quên mật khẩu</a>
                    </li>
                    <li><input type="submit" value="Đăng Nhập" id="btn-login-submit" class="ym-button ym-primary">
                </ul>
            </div>
        </div>
        {{ Form::close() }}
    </div>
</div>
@stop